from app import db

#菜品售卖日统计
class StatDailyFood(db.Model):
    __tablename__ = 'stat_daily_food'
    __table_args__ = (
        db.Index('date_food_id', 'date', 'food_id'),
    )

    id = db.Column(db.Integer, primary_key=True)
    date = db.Column(db.Date, nullable=False)
    food_id = db.Column(db.Integer,db.ForeignKey("food.id"), nullable=False)
    total_count = db.Column(db.Integer, nullable=False,comment="售卖总数量")
    total_pay_money = db.Column(db.Numeric(10, 2),comment="总售卖金额")
    updated_time = db.Column(db.DateTime, nullable=False)
    created_time = db.Column(db.DateTime, nullable=False)
